#define DEBUG_MEMORY_LEAKS 0

#include <iostream>
#include <string>

#include "Interpreter.h"

#if DEBUG_MEMORY_LEAKS==1
    #include <crtdbg.h>
#endif

using namespace std;

int main(int argc, char ** argv)
{
    int lResult = 0;

    #if DEBUG_MEMORY_LEAKS==1
    {
    #endif

    if (argc < 2)
    {
        cerr << "Usage: vm module arg1 arg2 ..." << endl;
        return 1;
    }

    Interpreter i(argv[1]);
    lResult = i.Run(argc, argv);
    
    #if DEBUG_MEMORY_LEAKS==1
    }
    _CrtDumpMemoryLeaks();
    #endif

    return lResult;
}
